package com.ljc.service;

import com.ljc.dao.NotifycationDao;
import com.ljc.entity.Notification;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NotifyCationServiceImpl implements NotificationService{
    @Autowired
    private NotifycationDao notifycationDao;
    @Override
    public void insert(Notification notifycation) {
        notifycationDao.insert(notifycation);
    }

    @Override
    public List<Notification> getByAdmit(int admitId,int type) {
        return notifycationDao.findByAdmit(admitId,type);
    }

    @Override
    public Notification getOne(int id) {
        return notifycationDao.getOne(id);
    }

    @Override
    public List<Notification> search(Notification notification) {
        return notifycationDao.search(notification);
    }

    @Override
    public void delete(int id) {
        notifycationDao.delete(id);
    }

    @Override
    public void update(Notification notification) {
        notifycationDao.update(notification);
    }
}
